import 'package:boss/provider/necessary_order_provider.dart';
import 'package:boss/ui/widget/button/fixed_bottom_btn.dart';
import 'package:flutter/material.dart';
import 'package:provider/provider.dart';

import 'necessary_order_list.dart';
import 'necessary_order_title.dart';

class NecessaryOrderBrowser extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return Container(
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: <Widget>[
          NecessaryOrderTitle(),
          NecessaryOrderList(),
          FixedBottomBtn(
            title: '保 存',
            onTap: () {
              var necessaryOrderProvider = Provider.of<NecessaryOrderProvider>(
                context,
                listen: false,
              );
              necessaryOrderProvider.update();
            },
          ),
        ],
      ),
    );
  }
}
